#include<stdio.h>

int fit(int gh)
{
	int a = 1;
	int b = 1;
	int c = 1;
	while (gh>2)
	{
		c = a + b;
		a = b;
		b = c;
		gh--;
	}
	return c;

}
int main()
{
	int shu = 0;
	scanf_s("%d", &shu);
	int ret = fit(shu);
	printf("%d\n", ret);

	return 0;
}